import Vue from "vue";
import VueRouter, { RouteConfig } from "vue-router";

Vue.use(VueRouter);

const routes: Array<RouteConfig> = [
    {
        path: "/",
        name: "Home",
        component: () => import("../views/Home.vue"),
        redirect: "/overview",
        children: [
            {
                path: "/overview",
                name: "overview",
                component: () => import("../views/Overview/index.vue"),
            },
            {
                path: "/process-management",
                name: "processmanagement",
                component: () => import("../views/ProcessManagement/index.vue"),
            },
        ],
    },
    {
        name: "login",
        path: "/login",
        component: () => import("../views/Login.vue"),
    },
];

const router = new VueRouter({
    routes,
});

export default router;
